# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Sodface <sod@sodface.com>
# Maintainer: Sodface <sod@sodface.com>
pkgname=nilfs-utils
pkgver=2.2.9
pkgrel=3
pkgdesc="Utilities for managing NILFS v2 filesystems"
url="https://nilfs.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake libtool linux-headers util-linux-dev"
options="!check" # no test suite
subpackages="$pkgname-libs $pkgname-dev $pkgname-doc"
source="https://nilfs.sourceforge.net/download/nilfs-utils-$pkgver.tar.bz2"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	LDCONFIG=/bin/true \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-static \
		--without-selinux

	sed -i \
		-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
		-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
		libtool
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
dd8ab20ee0d6750a6d81f86fe4d1ad94a8a71aa53ee7cd38550ea32fffcc9527db1c75d34f732f0f8f6379a808249f8eec2619e54c595566a3fc434a87d9e66d  nilfs-utils-2.2.9.tar.bz2
"
